package cc.xsubj.trading.tests;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.zip.GZIPOutputStream;

public class MakeZippedItemsDat
{

    /**
     * @param args
     * @throws IOException 
     * @throws FileNotFoundException 
     */
    public static void main(String[] args) throws FileNotFoundException, IOException
    {
        String[] items = {"Apple|1|0.5",
                          "Gold Coin|200|1",  
                        };
        File f = new File("data/items.dat");
        
        if(f.exists())
            f.delete();
        
        GZIPOutputStream os = new GZIPOutputStream(new FileOutputStream(f));
        for (String itr : items)
        {
            os.write("\n".getBytes());
            os.write(itr.getBytes());
        }
        os.close();
    }

}
